var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, o, n) {
    var i, c = arguments.length, a = c < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(t, e, o, n); else for (var r = t.length - 1; 0 <= r; r--) (i = t[r]) && (a = (c < 3 ? i(a) : 3 < c ? i(e, o, a) : i(e, o)) || a);
    return 3 < c && a && Object.defineProperty(e, o, a), a;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("HeadView"), s = e("GameConfig"), c = e("GameData"), l = e("EggsManager"), d = e("NewActivityEggsView"), u = e("ActivityManager"), p = e("WebManager"), h = cc._decorator, f = h.ccclass, g = h.property, m = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.versionLabel = null, t.infoLabel = null, t.copyNode = null, t;
    }
    return i(t, e), t.prototype.onLoad = function() {
        GA.PA && GA.PA.setClipboardData || (this.copyNode.active = !1);
        try {
            var t;
            -1 == l.default.getInstance().checkEggPerson(22) && u.ActivityManager.getInstance().checkActivity(u.ActivityType.SECOND) && ((t = new cc.Node()).parent = this.node, 
            t.addComponent(d.default).init({
                id: 22,
                type: d.NewActivityEggType.COMPLEX,
                num: 4,
                options: {
                    pos: cc.v2(-200, 20),
                    size: cc.size(120, 120),
                    target: this.sprite.node,
                    scale: .5,
                    path: "ui/newActivity/tigger/1"
                }
            }));
        } catch (t) {
            console.error(t);
        }
    }, t.prototype.onClickOpen = function() {
        p.default.getInstance().sentLog("首页打开用户详情"), this.node.active = !0;
    }, t.prototype.onClickClose = function() {
        p.default.getInstance().sentLog("首页关闭用户详情"), this.node.active = !1;
    }, t.prototype.onClickCopy = function() {
        p.default.getInstance().sentLog("首页复制用户详情"), this.doCopy(GA.Info.openId);
    }, t.prototype.doCopy = function(t) {
        GA.PA && GA.PA.setClipboardData && GA.PA.setClipboardData({
            data: t,
            success: function() {
                var t, e;
                null === (e = null === (t = GA.PA) || void 0 === t ? void 0 : t.showToast) || void 0 === e || e.call(t, {
                    title: "复制成功",
                    icon: "none"
                });
            },
            fail: function() {
                var t, e;
                null === (e = null === (t = GA.PA) || void 0 === t ? void 0 : t.showToast) || void 0 === e || e.call(t, {
                    title: "复制失败",
                    icon: "none"
                });
            }
        });
    }, t.prototype.onEnable = function() {
        c.GD.playerData && this.init(c.GD.playerData.icon, c.GD.playerData.nickname, c.GD.personIdx).catch(function(t) {
            return cc.log(t);
        });
    }, t.prototype.start = function() {
        this.infoLabel.string = "ID：" + GA.Info.openId, this.versionLabel.string = "版本号：" + s.GC.version;
    }, a([ g(cc.Label) ], t.prototype, "versionLabel", void 0), a([ g(cc.Label) ], t.prototype, "infoLabel", void 0), 
    a([ g(cc.Node) ], t.prototype, "copyNode", void 0), a([ f ], t);
}(r.default);

n.default = m;